import {

} from '../services/signup';
import { routerRedux } from 'dva/router';

export default {
  namespace: 'autoMenu',

  state: {
    loading: true,
  },
  effects: {
    *fetchListPluginSignUp({payload,callback}, { call, put }) {
      yield put({
        type: 'changeLoading',
        payload: true,
      });
      const response = yield call(listPluginSignUp,payload);
      yield put({
        type: 'changeLoading',
        payload: false,
      });
      callback(response.data)
    }

  },

  reducers: {
    changeLoading(state, action) {
      return {
        ...state,
        loading: action.payload,
      };
    },
  }
};
